#!/usr/bin/env python
# -*- coding:utf-8 -*-

'''
def login(user):
    if user == "alex":
        return True
    else :return
      #  print "invalid user"

def wrapper(func):
    if login("dd"):
        return func
def redirect(url):pass

#@wrapper     #home=wrapper(home)


def home():
    print "showing the home page"
def host_list():
    print "showint the host list page"
def user_list():
    print "showint the user list page"

home=wrapper(home)
home()
'''

def wrapper(func):
    def login():
        user=raw_input("input user name:")
        if user=="name":
            func()
        else:print "invalid user"
    return login

@wrapper
def home():
    print "welcom to the homepage"

home()